#ifndef _CPP_STORY_STEP_H_
#define _CPP_STORY_STEP_H_

#include <string>
#ifdef WIN32
#include "cppstory_win32.h"
#endif

namespace CppStory
{

class Table;
class StepDefinition;

#ifdef WIN32
class CPPSTORY_WIN32_API Step
#else
class Step
#endif
{
public:
    Step(const char* f, const int l);
    ~Step();
    void set_name(std::string n);
    const char* get_name();
    const char* get_type() { return type.c_str(); }
    void set_step_def(StepDefinition *s);
    StepDefinition* get_step_def()  { return step_def; }
    const char* get_file() { return file.c_str(); }
    const int get_line() { return line; }
    void create_table();
    Table* get_table() { return table; }
    bool replace(std::string s, std::string d);
    bool run();
protected:
    std::string type;
    StepDefinition* step_def;
    Table* table;
private:
    std::string name;
    std::string file;
    int line;

    std::string replace_str;
    bool replaced;
};

#ifdef WIN32
class CPPSTORY_WIN32_API Given : public Step
#else
class Given : public Step
#endif
{
public:
    Given(const char* f, const int l);
};

#ifdef WIN32
class CPPSTORY_WIN32_API When : public Step
#else
class When : public Step
#endif
{
public:
    When(const char* f, const int l);
};

#ifdef WIN32
class CPPSTORY_WIN32_API Then : public Step
#else
class Then : public Step
#endif
{
public:
    Then(const char* f, const int l);
};

#ifdef WIN32
class CPPSTORY_WIN32_API And : public Step
#else
class And : public Step
#endif
{
public:
    And(const char* f, const int l);
};

#ifdef WIN32
class CPPSTORY_WIN32_API But : public Step
#else
class But : public Step
#endif
{
public:
    But(const char* f, const int l);
};

}

#endif

